/*
Copyright 2022 The Numaproj Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Code generated by Openapi Generator. DO NOT EDIT.

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RedisSentinelConfig {
    /// At least one Sentinel endpoint; 2–3 recommended. Use host:port pairs. Example: [\"sentinel-0.redis.svc:26379\", \"sentinel-1.redis.svc:26379\"]
    #[serde(rename = "endpoints")]
    pub endpoints: Vec<String>,
    /// Required Sentinel \"service name\" (aka master name) from sentinel.conf
    #[serde(rename = "masterName")]
    pub master_name: String,
    #[serde(rename = "redisAuth", skip_serializing_if = "Option::is_none")]
    pub redis_auth: Option<Box<crate::models::RedisAuth>>,
    #[serde(rename = "redisTLS", skip_serializing_if = "Option::is_none")]
    pub redis_tls: Option<Box<crate::models::Tls>>,
    #[serde(rename = "sentinelAuth", skip_serializing_if = "Option::is_none")]
    pub sentinel_auth: Option<Box<crate::models::RedisAuth>>,
    #[serde(rename = "sentinelTLS", skip_serializing_if = "Option::is_none")]
    pub sentinel_tls: Option<Box<crate::models::Tls>>,
}

impl RedisSentinelConfig {
    pub fn new(endpoints: Vec<String>, master_name: String) -> RedisSentinelConfig {
        RedisSentinelConfig {
            endpoints,
            master_name,
            redis_auth: None,
            redis_tls: None,
            sentinel_auth: None,
            sentinel_tls: None,
        }
    }
}
